import request from '@/utils/request'

//道闸设备列表
export function fetchList(query) {
  return request({
    url: '/railDevice/list',
    method: 'post',
    data: query
  })
}

// 道闸设备详情
export function railDeviceDetail(id) {
  return request({
    url: '/railDevice/' + id,
    method: 'get',
  })
}

// 创建道闸设备
export function railDeviceAdd(data) {
  return request({
    url: '/railDevice/create',
    method: 'post',
    data
  })
}

// 更新道闸设备
export function railDeviceUpdate(data) {
  return request({
    url: '/railDevice/update',
    method: 'post',
    data
  })
}

// 删除道闸设备
export function railDeviceRemove(id) {
  return request({
    url: '/railDevice/delete/' + id,
    method: 'post',
  })
}
